#!/bin/bash

echo "---------------------------------------------------------------------"
echo "打包编译项目"
echo "---------------------------------------------------------------------"
yarn dev
echo "---------------------------------------------------------------------"
echo "清空线上项目"
echo "---------------------------------------------------------------------"
ssh me rm -rf //docker/nginx/www/www.winnerwly.top/*
if [ $? -eq 0 ]; then
  echo "删除成功"
else
  echo "删除失败"
  exit
fi
echo "---------------------------------------------------------------------"
echo "上传新的项目文件"
echo "---------------------------------------------------------------------"
scp -r ./build/* me://docker/nginx/www/www.winnerwly.top
echo "---------------------------------------------------------------------"
echo "项目更新完成"
echo "---------------------------------------------------------------------"
